﻿@model GrainManage.Web.Models.Trade.UpdateTradeModel
@ScriptHelper.CssLink("Edit.css")
@ScriptHelper.Autocomplete()
<script type="text/javascript">
    $(document).ready(function () {
        var data = { pageIndex: 0, pageSize: 100 };
        BindAutoComplete("/Type/GetGrainType", "#Grain", data, true);
        BindAutoComplete("/Type/GetTradeType", "#TradeType", data, true);
    });
</script>
@using (Html.BeginForm("Update", "Trade", FormMethod.Post))
{
    // @Html.ValidationSummary()
    <table class="edit">
        <tr>
            <td>@Html.LabelFor(model => model.TradeID)</td>
            <td>@Html.EditorFor(model => model.TradeID)</td>
            <td>@Html.ValidationMessageFor(model => model.TradeID)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.ContactID)</td>
            <td>@Html.EditorFor(model => model.ContactID)</td>
            <td>@Html.ValidationMessageFor(model => model.ContactID)</td>
        </tr>

        <tr>
            <td>@Html.LabelFor(model => model.Grain)</td>
            <td>@Html.EditorFor(model => model.Grain)</td>
            <td>@Html.ValidationMessageFor(model => model.Grain)</td>
        </tr>

        <tr>
            <td>@Html.LabelFor(model => model.Price)</td>
            <td>@Html.EditorFor(model => model.Price)</td>
            <td>@Html.ValidationMessageFor(model => model.Price)</td>
        </tr>

        <tr>
            <td>@Html.LabelFor(model => model.Weight)</td>
            <td>@Html.EditorFor(model => model.Weight)</td>
            <td>@Html.ValidationMessageFor(model => model.Weight)</td>
        </tr>

        <tr>
            <td>@Html.LabelFor(model => model.ActualMoney)</td>
            <td>@Html.EditorFor(model => model.ActualMoney)</td>
            <td>@Html.ValidationMessageFor(model => model.ActualMoney)</td>
        </tr>

        <tr>
            <td>@Html.LabelFor(model => model.TradeType)</td>
            <td>@Html.EditorFor(model => model.TradeType)</td>
            <td>@Html.ValidationMessageFor(model => model.TradeType)</td>
        </tr>

        <tr>
            <td>@Html.LabelFor(model => model.Remarks)</td>
            <td>@Html.EditorFor(model => model.Remarks)</td>
            <td>@Html.ValidationMessageFor(model => model.Remarks)</td>
        </tr>

        <tr class="submit">
            <td></td>
            <td>
                <input type="submit" value="@GrainManage.Web.Resources.GlobalResx.Save" />
            </td>
        </tr>
    </table>
}
